package com.magist.core.util;

import org.springframework.util.ObjectUtils;

import java.text.DecimalFormat;

public class PrintOutUtil {

    public static String printOut(Object obj) {
        if(ObjectUtils.isEmpty(obj)) {
            return "";
        }
        if (obj instanceof Double) {
            DecimalFormat df = new DecimalFormat("0.00");
            String num = df.format(obj);
            return num;
        }
        return obj.toString();
    }

}
